<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/common/common.jsp"%>

<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title><%=systemManageName %></title>

  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit">

  <!-- No Baidu Siteapp-->
  <meta http-equiv="Cache-Control" content="no-siteapp"/>

  <link rel="icon" type="image/png" href="<%=path %>/res/assets/i/favicon.png">

  <!-- Add to homescreen for Chrome on Android -->
  <meta name="mobile-web-app-capable" content="yes">
  <link rel="icon" sizes="192x192" href="<%=path %>/res/assets/i/app-icon72x72@2x.png">

  <!-- Add to homescreen for Safari on iOS -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
  <link rel="apple-touch-icon-precomposed" href="<%=path %>/res/assets/i/app-icon72x72@2x.png">

  <!-- Tile icon for Win8 (144x144 + tile color) -->
  <meta name="msapplication-TileImage" content="<%=path %>/res/assets/i/app-icon72x72@2x.png">
  <meta name="msapplication-TileColor" content="#0e90d2">

  <!-- SEO: If your mobile URL is different from the desktop URL, add a canonical link to the desktop page https://developers.google.com/webmasters/smartphone-sites/feature-phones -->
  <!--
  <link rel="canonical" href="http://www.example.com/">
  -->

  <link rel="stylesheet" href="<%=path %>/res/assets/css/amazeui.min.css">
  <link rel="stylesheet" href="<%=path %>/res/assets/css/app.css">
  <link rel="stylesheet" href="<%=path %>/res/css/amaze-custom.css">
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a
  href="http://browsehappy.com/" target="_blank">升级浏览器</a>
  以获得更好的体验！</p>
<![endif]-->

	<%@ include file="/common/nav.jsp"%>

	
	<div class="am-container">
	
		<h1>资讯列表</h1>
	
		<div class="am-g">
			<div class="am-u-sm-12">
				<form class="am-form-inline" role="form" method="post" action="<%=path %>/manage/notice/" id="searchForm">
				
					<div class="am-form-group">
						<input type="text" class="am-form-field" name="searchContent" placeholder="请输入内容搜索" value="${record.searchContent }">
					</div>
				
					<button type="submit" class="am-btn am-btn-primary">查询</button>
					
					<a class="am-btn am-btn-danger" href="<%=path %>/manage/notice/addDisp"><i class="am-icon-plus"></i>新增</a>
					
				</form>
			</div>
		</div>

		<table class="am-table">
		    <thead>
		        <tr>
		            <th>标题</th>
		            <th>发布日期</th>
		            <th>状态</th>
		            <th>类型</th>
		            <th>阅读数</th>
		            <th>点赞数</th>
		            <th>操作</th>
		        </tr>
		    </thead>
		    <tbody>
		    
		    	<c:forEach items="${page.list }" var="obj" varStatus="i">
					<tr>
						<td>
							${obj.title }
						</td>
						<td>
							<fmt:formatDate value="${obj.publishTime }" pattern="YYYY-MM-dd" />
						</td>
						<td>
							<dic:getNodeName path="TOP->USE_STATUS->${obj.status }"></dic:getNodeName>
						</td>
						<td>
							<dic:getNodeName path="TOP->NEWS_LX->${obj.lx }"></dic:getNodeName>
						</td>
						<td>
							${obj.readCount }
						</td>
						<td>
							${obj.praiseCount }
						</td>
						<td>
							<a href="<%=path %>/manage/notice/editDisp?id=${obj.id }">修改</a>
							<a href="javascript:del('${obj.id }');">删除</a>
						</td>
					</tr>
				</c:forEach>
		    
		    </tbody>
		</table>
		
		<div class="am-g">
			<div class="am-u-sm-12" align="center">
				<page_amaze_ui:pager pageNumber="${page.pageNumber }" totalPage="${page.totalPage }" pageSize="${page.pageSize }" totalRow="${page.totalRow }"></page_amaze_ui:pager>
		
			</div>
		</div>
		
	</div>
    
    
    


<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="<%=path %>/res/assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="<%=path %>/res/assets/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="<%=path %>/res/assets/js/amazeui.min.js"></script>
<script src="<%=path %>/res/assets/js/amazeui.min.js"></script>
<script src="<%=path %>/res/js/page.js"></script>

<script type="text/javascript">
	function del(id){
		if(confirm("确认删除？")){
			window.location.href='<%=path %>/manage/notice/del?id='+id;
		}
	}
	
</script>
</body>
</html>
